package com.ygqh.baby.po;

import com.ygqh.baby.ao.DataStatus;

import java.math.BigDecimal;
import java.util.Date;

public class YgSku {
    private Long id;

    private String skuCode;

    private Long productId;

    private String sizeName;

    private BigDecimal salesPrice;

    private BigDecimal sourceSalesPrice;

    private BigDecimal wholesalePrice;

    private BigDecimal distributionPrice;

    private BigDecimal costPrice;

    private DataStatus status;

    private Date createTime;

    private String createBy;

    private Date updateTime;

    private String updateBy;

    private Long stockId;

    private BigDecimal newCustomPrice;

    /*********************************/
    private YgStock stock;
    private BigDecimal promotionPrice;
    private BigDecimal vipPrice;

    public YgSku() {
        super();
    }

    public YgSku(String skuCode, String sizeName, BigDecimal salesPrice,
                 BigDecimal sourceSalesPrice, Long stockId, Date createTime,
                 String createBy, Date updateTime, String updateBy, YgStock stock) {
        super();
        this.skuCode = skuCode;
        this.sizeName = sizeName;
        this.salesPrice = salesPrice;
        this.sourceSalesPrice = sourceSalesPrice;
        this.stockId = stockId;
        this.createTime = createTime;
        this.createBy = createBy;
        this.updateTime = updateTime;
        this.updateBy = updateBy;
        this.stock = stock;
    }

    public YgSku(String skuCode, Long productId, String sizeName,
                 BigDecimal salesPrice, BigDecimal sourceSalesPrice, Long stockId,
                 Date createTime, String createBy, Date updateTime, String updateBy) {
        super();
        this.skuCode = skuCode;
        this.productId = productId;
        this.sizeName = sizeName;
        this.salesPrice = salesPrice;
        this.sourceSalesPrice = sourceSalesPrice;
        this.stockId = stockId;
        this.createTime = createTime;
        this.createBy = createBy;
        this.updateTime = updateTime;
        this.updateBy = updateBy;
    }

    public BigDecimal getDistributionPrice() {
        return distributionPrice;
    }

    public void setDistributionPrice(BigDecimal distributionPrice) {
        this.distributionPrice = distributionPrice;
    }

    public YgStock getStock() {
        return stock;
    }

    public void setStock(YgStock stock) {
        this.stock = stock;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSkuCode() {
        return skuCode;
    }

    public void setSkuCode(String skuCode) {
        this.skuCode = skuCode == null ? null : skuCode.trim();
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getSizeName() {
        return sizeName;
    }

    public void setSizeName(String sizeName) {
        this.sizeName = sizeName == null ? null : sizeName.trim();
    }

    public BigDecimal getSalesPrice() {
        return salesPrice;
    }

    public void setSalesPrice(BigDecimal salesPrice) {
        this.salesPrice = salesPrice;
    }

    public BigDecimal getSourceSalesPrice() {
        return sourceSalesPrice;
    }

    public void setSourceSalesPrice(BigDecimal sourceSalesPrice) {
        this.sourceSalesPrice = sourceSalesPrice;
    }

    public Long getStockId() {
        return stockId;
    }

    public void setStockId(Long stockId) {
        this.stockId = stockId;
    }

    public DataStatus getStatus() {
        return status;
    }

    public void setStatus(DataStatus status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy == null ? null : createBy.trim();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy == null ? null : updateBy.trim();
    }

    public BigDecimal getNewCustomPrice() {
        return newCustomPrice;
    }

    public void setNewCustomPrice(BigDecimal newCustomPrice) {
        this.newCustomPrice = newCustomPrice;
    }

    public BigDecimal getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(BigDecimal costPrice) {
        this.costPrice = costPrice;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        YgSku other = (YgSku) obj;
        if (id == null) {
            if (other.id != null)
                return false;
        } else if (!id.equals(other.id))
            return false;
        return true;
    }

    public BigDecimal getWholesalePrice() {
        return wholesalePrice;
    }

    public void setWholesalePrice(BigDecimal wholesalePrice) {
        this.wholesalePrice = wholesalePrice;
    }

    public BigDecimal getPromotionPrice() {
        return promotionPrice;
    }

    public void setPromotionPrice(BigDecimal promotionPrice) {
        this.promotionPrice = promotionPrice;
    }

    public BigDecimal getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(BigDecimal vipPrice) {
        this.vipPrice = vipPrice;
    }

}